<!DOCTYPE html>
<html class="x-admin-sm" lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>订单详情页面</title>
    <header th:replace="header::html"></header>
</head>
<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;margin-left: 20%">
    <legend>订单流程</legend>
</fieldset>
<input type="hidden" id="oid" th:value="${oid}" style="margin-left: 20%">
<ul class="layui-timeline" id="allMenu" style="margin-left: 10%">

</ul>


</body>
<script>
	window.onload = function () {

		var oid1 = document.getElementById("oid").value;

		$.ajax({
			type: 'GET',
			url: '/api-front/serviceproviders/getOrderForm',
			data: {'oid': oid1},
			success: function (result) {

				for (var i = 0; i < result.length; i++) {

					if (i===0){
						 $('#allMenu').append('<li class="layui-timeline-item">\n' +
							 '        <i class="layui-icon layui-timeline-axis"></i>\n' +
							 '        <div class="layui-timeline-content layui-text">\n' +
							 '            <div class="layui-timeline-title">'+result[i].generatetime+','+result[i].generatematter+'</div>\n' +
							 '        </div>\n' +
							 '    </li>');

					}else{
						$('#allMenu').append('    <li class="layui-timeline-item">\n' +
							'        <i class="layui-icon layui-timeline-axis"></i>\n' +
							'        <div class="layui-timeline-content layui-text">\n' +
							'            <div class="layui-timeline-title">'+result[i].generatetime+','+result[i].generatematter+'</div>\n' +
							'        </div>\n' +
							'    </li>');
                    }

				}
			}
		});
	};



</script>


</html>
